﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Model;
using Model.CommonModel.PageModel;
using Model.EntityModel.Auth;
using Model.EntityModel.SysModel;
using Model.QueryModel.system;
using Model.ResultModel;

namespace Repository.IRepository.ISysRepository
{
    public interface IUserRepository : IBaseRepository<User>
    {
        User GetUserById(string userId);
        User GetUserByUsername(string username);
        bool CreateUser(User user);
        bool UpdateUser(User user);
        bool UpdateUserStatus(string userId, string status);
        bool UpdatePassword(string userId, string newPassword);
        List<User> GetUsersByDepartment(string deptCode);
        bool UserExists(string userId);
        PagedInfo<User> GetSearch(int pageNum, int pageSize, QueryUser search);
        Task<LoginResult> LoginAsync(string username, string password);
        Task<bool> ChangePasswordAsync(string userId, string oldPassword, string newPassword);
        Task<bool> ResetPasswordAsync(string userId, string newPassword);
        Task<List<User>> GetUsersByDeptAsync(string deptCode);
        Task<bool> UpdateUserStatusAsync(string userId, string status, DateTime? inactiveDate = null);

    }
}
